
<!DOCTYPE html>
<html lang="en">
  <head>
    <meta charset="utf-8">
    <meta name="viewport" content="width=device-width, initial-scale=1.0">
    <meta name="description" content="">
    <meta name="author" content="">

    <!-- Le styles -->
    <link href="{{bootstrap_css}}" rel="stylesheet">
    <link href="{{framewarp_css}}" rel="stylesheet">
    <link href="{{utils_css}}" rel="stylesheet">
    <style type="text/css">
      body {
        padding-top: 40px;
        padding-bottom: 40px;
        background-color: #f5f5f5;
      }

      .form-signin {
        max-width: 300px;
        padding: 19px 29px 29px;
        margin: 0 auto 20px;
        background-color: #fff;
        border: 1px solid #e5e5e5;
        position: absolute;
        left: 120px;
        -webkit-border-radius: 5px;
           -moz-border-radius: 5px;
                border-radius: 5px;
        -webkit-box-shadow: 0 1px 2px rgba(0,0,0,.05);
           -moz-box-shadow: 0 1px 2px rgba(0,0,0,.05);
                box-shadow: 0 1px 2px rgba(0,0,0,.05);
      }
      .form-signin .form-signin-heading,
      .form-signin .checkbox {
        margin-bottom: 10px;
      }
      .form-signin input[type="text"],
      .form-signin input[type="password"] {
        font-size: 16px;
        height: auto;
        margin-bottom: 15px;
        padding: 7px 9px;
      }

    </style>
    <script>
    function hash_pass(aForm){
      var inputPassword = aForm['password'];
      inputPassword.value = Sha1.hash(inputPassword.value);
      return true;
    }
    </script>

    <!-- HTML5 shim, for IE6-8 support of HTML5 elements -->
    <!--[if lt IE 9]>
      <script src="http://html5shim.googlecode.com/svn/trunk/html5.js"></script>
    <![endif]-->
  </head>

  <body class="framePage">

    <div class="container">
      {% for m in msg %}
      <div class="alert alert-error">
        <button type="button" class="close" data-dismiss="alert">×</button>
        <strong>Oh snap!</strong> {{m}}
      </div>
      {% endfor %}
      <form class="form-signin" method = "post" action="try" name="login_form" onSubmit="hash_pass(this);">
        <h2 class="form-signin-heading">Login to Time'sApp</h2>
        <input type="text" class="input-block-level" placeholder="Username" name="user">
        <input type="password" class="input-block-level" placeholder="Password" name="password")>
        <label class="checkbox">
          <input type="checkbox" value="remember-me" name="remember"> Remember me
        </label>
        <input class="btn btn-large btn-primary" type="submit" value="Sign in")>
      </form>

    </div> <!-- /container -->

    <!-- Le javascript
    ================================================== -->
    <!-- Placed at the end of the document so the pages load faster -->
    <script src="{{jquery_js}}"></script>
    <script src="{{bootstrap_js}}"></script>
    <script src="{{japp_js}}"></script>
    <script src="{{utils_js}}"></script>
    <script src="{{framewarp_js}}"></script>
    {% if leave %}
    <script>
    hide_frame();
    parent.location.reload();
    </script>
    {% endif %}
  </body>
</html>
